package com.qqtech.qquan.user.model;

import java.util.List;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.qqtech.core.common.util.StringUtil;
import com.qqtech.qquan.community.model.CommunityBaseVo;
import com.qqtech.qquan.user.enums.UserConst;

@SuppressWarnings("serial")
public class UserBaseVo extends UserBase {
	/** 共同加入圈子数量 **/
	private java.lang.Integer ourCircleCount;

	/**
	 * 是否是好友
	 */
	private Integer isFriend;
	/**
	 * 是否是新注册用户
	 */
	private Integer isNew;
	/**
	 * 新用户的总数
	 */
	private Integer isNewCount;
	/**
	 * 好友关系-已添加,待验证,陌生人
	 */
	private String friendShipDesc;

	/**
	 * 是否显示“添加好友”按钮
	 */
	private boolean isShowAddBtn;

	/**
	 * 留言数量
	 */
	private Integer userMessageQuantity;
	/**
	 * 用户留言
	 */
	private String message;

	/**
	 * 是否显示"新留言"
	 */
	private boolean isShowMsg;
	private String concernCommunityNames;
	private List<CommunityBaseVo> concernCommunity;
	/** 帐号类型:1-手机号;2-email */
	private java.lang.Integer type;
	/** 帐号类型中文:手机号;email */
	private java.lang.String typeDesc;

	/**
	 * 性别描述
	 */
	private String sexDesc;

	/**
	 * 用户的帐号
	 */
	private String userIdentity;
	/**
	 * 社区名
	 */
	private String communityName;

	// 用户发帖数
	private Integer talentCount;
	// 用户评论数
	private Integer totalCommentCount;
	// 用户发帖被点赞数
	private Integer totalPraiseCount;
	/** 用户荣誉值 **/
	private Integer honorValue;
	/** 用户荣誉等级 **/
	private Integer honorLevel;
	/** 用户荣誉等级名称(冗余字段) **/
	private String honorLevelName;
	// 圈币
	private Integer quanValue;
	// 余额
	private Integer money;
	// 代金卷数量
	private Integer couponCount;
	// 订单数量
	private Integer orderCount;

	public String getCommunityName() {
		return communityName;
	}

	public void setCommunityName(String communityName) {
		this.communityName = communityName;
	}

	public String getUserIdentity() {
		return userIdentity;
	}

	public void setUserIdentity(String userIdentity) {
		this.userIdentity = userIdentity;
	}

	public List<CommunityBaseVo> getConcernCommunity() {
		return concernCommunity;
	}

	public String getConcernCommunityNames() {
		return concernCommunityNames;
	}

	public String getFriendShipDesc() {
		return friendShipDesc;
	}

	public java.lang.String getFullLogo() {
		if (StringUtil.isBlank(super.getLogo())) {
			return "";
		}
		return super.getImgHandleDomain() + "" + super.getLogo() + UserConst.IMG_POSTFIX;
	}

	public java.lang.String getBigFullLogo() {
		if (StringUtil.isBlank(super.getLogo())) {
			return "";
		}
		return super.getImgHandleDomain() + "" + super.getLogo();
	}

	public String getMessage() {
		return message;
	}

	public java.lang.Integer getOurCircleCount() {
		return ourCircleCount;
	}

	public String getSexDesc() {
		return sexDesc;
	}

	public Integer getUserMessageQuantity() {
		return userMessageQuantity;
	}

	public boolean isShowAddBtn() {
		return isShowAddBtn;
	}

	public boolean isShowMsg() {
		return isShowMsg;
	}

	public void setConcernCommunity(List<CommunityBaseVo> concernCommunity) {
		if (concernCommunity.size() > 0) {
			StringBuilder sb = new StringBuilder();
			for (int i = 0; i < concernCommunity.size(); i++) {
				sb.append(concernCommunity.get(i).getName()).append("，");
			}
			setConcernCommunityNames(sb.toString().substring(0, sb.toString().length() - 1));
		}

		this.concernCommunity = concernCommunity;
	}

	public void setConcernCommunityNames(String concernCommunityNames) {
		this.concernCommunityNames = concernCommunityNames;
	}

	public void setFriendShipDesc(String friendShipDesc) {
		this.friendShipDesc = friendShipDesc;
	}

	public Integer getIsFriend() {
		return isFriend;
	}

	public void setIsFriend(Integer isFriend) {
		this.isFriend = isFriend;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public void setOurCircleCount(java.lang.Integer ourCircleCount) {
		this.ourCircleCount = ourCircleCount;
	}

	public void setSexDesc(String sexDesc) {
		this.sexDesc = sexDesc;
	}

	public void setShowAddBtn(boolean isShowAddBtn) {
		this.isShowAddBtn = isShowAddBtn;
	}

	public void setShowMsg(boolean isShowMsg) {
		this.isShowMsg = isShowMsg;
	}

	public void setUserMessageQuantity(Integer userMessageQuantity) {
		this.userMessageQuantity = userMessageQuantity;
	}

	public Integer getTalentCount() {
		return talentCount;
	}

	public void setTalentCount(Integer talentCount) {
		this.talentCount = talentCount;
	}

	public Integer getTotalCommentCount() {
		return totalCommentCount;
	}

	public void setTotalCommentCount(Integer totalCommentCount) {
		this.totalCommentCount = totalCommentCount;
	}

	public Integer getTotalPraiseCount() {
		return totalPraiseCount;
	}

	public void setTotalPraiseCount(Integer totalPraiseCount) {
		this.totalPraiseCount = totalPraiseCount;
	}

	public Integer getHonorValue() {
		return honorValue;
	}

	public void setHonorValue(Integer honorValue) {
		this.honorValue = honorValue;
	}

	public Integer getHonorLevel() {
		return honorLevel;
	}

	public void setHonorLevel(Integer honorLevel) {
		this.honorLevel = honorLevel;
	}

	public String getHonorLevelName() {
		return honorLevelName;
	}

	public void setHonorLevelName(String honorLevelName) {
		this.honorLevelName = honorLevelName;
	}

	public Integer getMoney() {
		return money;
	}

	public void setMoney(Integer money) {
		this.money = money;
	}

	public Integer getCouponCount() {
		return couponCount;
	}

	public void setCouponCount(Integer couponCount) {
		this.couponCount = couponCount;
	}

	public Integer getOrderCount() {
		return orderCount;
	}

	public void setOrderCount(Integer orderCount) {
		this.orderCount = orderCount;
	}

	public Integer getQuanValue() {
		return quanValue;
	}

	public void setQuanValue(Integer quanValue) {
		this.quanValue = quanValue;
	}

	public boolean getIsShowInterests() {
		if (StringUtil.isNotBlank(this.getInterests())) {
			return true;
		} else {
			return false;
		}
	}

	/**
	 * 中文拼音首字母（大写）
	 * 
	 * @return
	 */
	public String getFirstChar() {
		if (StringUtil.isNotBlank(this.getChnSpell())) {
			return this.getChnSpell().substring(0, 1);
		} else {
			return "#";
		}
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
	}

	public java.lang.Integer getType() {
		return type;
	}

	public void setType(java.lang.Integer type) {
		this.type = type;
	}

	public java.lang.String getTypeDesc() {
		return typeDesc;
	}

	public void setTypeDesc(java.lang.String typeDesc) {
		this.typeDesc = typeDesc;
	}

	public java.lang.Integer getIsNew() {
		return isNew;
	}

	public void setIsNew(java.lang.Integer isNew) {
		this.isNew = isNew;
	}

	public java.lang.Integer getIsNewCount() {
		return isNewCount;
	}

	public void setIsNewCount(java.lang.Integer isNewCount) {
		this.isNewCount = isNewCount;
	}
}